package com.csinc.generate.core.make.impl.freemarker;

import com.csinc.generate.core.make.impl.MakeProjectMaker;
import com.csinc.generate.core.base.model.LogBackEntity;

/**
 * Create By 郭金宝 on 2018/7/26.<br>
 */
public class LogbackMaker extends MakeProjectMaker<LogbackMaker> {

    protected String projectRootPackage;

    protected LogBackEntity logBackEntity = new LogBackEntity();

    public LogbackMaker projectRootPackage(String projectRootPackage) {
        this.projectRootPackage = projectRootPackage;
        return this;
    }

    public LogbackMaker logBackEntity(LogBackEntity logBackEntity) {
        this.logBackEntity = logBackEntity;
        return this;
    }


    @Override
    public LogbackMaker make() {
        data();
        this.out("logback.ftl", data);
        return this;
    }

    @Override
    public void data() {
        fileName = "logback-spring.xml";
        data.put("projectRootPackage", projectRootPackage);
        data.put("logBackEntity", logBackEntity);
    }
}

